<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>
<script>
let a = ['/login', '/learn-comp','/404']
//判断索引值
// console.log(a.indexOf('/login') !== -1)
console.log(a.findIndex(t=> t==='/login')!==-1)
//查找
console.log(a.find(t=> t==='/login')!==undefined)
// console.log(a.filter(t=> t==='/login').length>0)
//是否包含
console.log(a.includes('/login'))
</script>
</html>
